import Events from "../Events";
class LineCache extends Events {
    constructor() {
        super();
        this.Content = {};
    }
    create(form, to) {


        this.run('Delete', 'Create');
    }
    each(callback) {
        for (const key in this.Content) {
            const element = this.Content[key];
            callback(element);
        }
    }
    eachOptions(callback) {
        for (const key in this.Content) {
            const element = this.Content[key];
            callback(element.getBaseOption());
        }
    }
    delete(item) {
        item.destroy();
        this.run('Delete', item);
        delete this.Content[item.id];
    }
}

export default LineCache;